<template>
  <el-card shadow="hover" class="chart-card">
    <div slot="header" class="chart-header">
      <span>{{ title }}</span>
    </div>
    <div class="chart-container">
      <slot></slot>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'ChartCard',
  props: {
    title: {
      type: String,
      required: true
    }
  }
}
</script>

<style lang="scss" scoped>
.chart-card {
  margin-bottom: 20px;

  .chart-header {
    font-weight: bold;
    font-size: 16px;
  }

  .chart-container {
    height: 300px;
    position: relative;
  }
}
</style>
